﻿package mortal.game.view.copy.defenseCopy.view
{
    import com.mui.containers.globalVariable.*;
    import com.mui.controls.*;
    import fl.data.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class DefenseCopyUnfoldCellRenderer extends GCellRenderer
    {
        private var _list:GTileList;

        public function DefenseCopyUnfoldCellRenderer()
        {
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            this._list.dataProvider = new DataProvider(param1 as Array);
            this._list.drawNow();
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            pushUIToDisposeVec(UIFactory.bg(0, 0, 240, 110, this, ImagesConst.DefenseCopyUnfoldItemBg));
            this._list = UIFactory.tileList(5, 0, 225, 110, this);
            this._list.setStyle("cellRenderer", DefenseCopyUnfoldGoodsCellRenderer);
            this._list.columnWidth = 75;
            this._list.rowHeight = 110;
            this._list.direction = GBoxDirection.VERTICAL;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._list.dispose(param1);
            this._list = null;
            return;
        }// end function

    }
}
